//h5空白页支付
export class H5BlankPayment {
  pay(payInfoObj) {
    const { app_id, success_back_url, failed_back_url, payUrl, payConfig } =
      payInfoObj;
    return new Promise((resolve, reject) => {
      try {
        window.location.replace(
          `${payUrl}?app_id=${app_id}&success_back_url=${success_back_url}&failed_back_url=${failed_back_url}&pay_config=${payConfig}`
        );
        resolve();
      } catch (error) {
        reject(error);
      }
    });
  }
}
